package com.sa.module.uif.pojo;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

@MappedSuperclass
public class AbstractUsers {

	//fields
	private int id;
	private String userName;
	private String password;
	private String email;
	private String TagIds;
	private String picture;
	private String homePage;
	private int isOfficial;
	private int leadNum;
	private int storeNum;
	private Timestamp openTime;
	
	// Constructors

	 /** full constructor */
	public AbstractUsers(int id, String userName, String password, String email,
			String tagIds, String picture, String homePage, int isOfficial,
			int leadNum, int storeNum, Timestamp openDate) {
		super();
		this.id = id;
		this.userName = userName;
		this.password = password;
		this.email = email;
		TagIds = tagIds;
		this.picture = picture;
		this.homePage = homePage;
		this.isOfficial = isOfficial;
		this.leadNum = leadNum;
		this.storeNum = storeNum;
		this.openTime = openDate;
	}
	
	 /** default constructor */
	public AbstractUsers() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	// Property accessors
    @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id", unique=true, nullable=false)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Column(name="userName", nullable=true, length=30)
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	@Column(name="password", nullable=true, length=30)
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	@Column(name="email", nullable=true, length=30)
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	
	@Column(name="tagIds", nullable=true, length=100)
	public String getTagIds() {
		return TagIds;
	}
	public void setTagIds(String tagIds) {
		TagIds = tagIds;
	}
	
	@Column(name="picture", nullable=true, length=200)
	public String getPicture() {
		return picture;
	}
	public void setPicture(String picture) {
		this.picture = picture;
	}
	
	@Column(name="homePage", nullable=true, length=100)
	public String getHomePage() {
		return homePage;
	}
	public void setHomePage(String homePage) {
		this.homePage = homePage;
	}
	
	@Column(name="isOfficial", nullable=true)
	public int getIsOfficial() {
		return isOfficial;
	}
	public void setIsOfficial(int isOfficial) {
		this.isOfficial = isOfficial;
	}
	
	@Column(name="leadNum", nullable=true)
	public int getLeadNum() {
		return leadNum;
	}
	public void setLeadNum(int leadNum) {
		this.leadNum = leadNum;
	}
	
	@Column(name="storeNum", nullable=true)
	public int getStoreNum() {
		return storeNum;
	}
	public void setStoreNum(int storeNum) {
		this.storeNum = storeNum;
	}
	
	@Column(name="openTime", nullable=true)
	public Timestamp getOpenTime() {
		return openTime;
	}
	public void setOpenTime(Timestamp openDate) {
		this.openTime = openDate;
	}

	//toString
	
	@Override
	public String toString() {
		return "AbstractUser [id=" + id + ", userName=" + userName
				+ ", password=" + password + ", email=" + email + ", TagIds="
				+ TagIds + ", picture=" + picture + ", homePage=" + homePage
				+ ", isOfficial=" + isOfficial + ", leadNum=" + leadNum
				+ ", storeNum=" + storeNum + ", openTime=" + openTime + "]";
	}
	
	
}
